基础工具安装
homebrew
官网https://brew.sh/
安装
1 | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
替换清华源
1 | git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git |
还原回官方源(如果镜像无法使用)
1 | git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git |
替换Bottles源
1 | echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc |
zsh
使用brew安装zsh
1 | brew install zsh |
iTerm2
下载安装https://iterm2.com
配置item2的shell为zsh
oh-my-zsh
安装 https://ohmyz.sh
1 | sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
安装powerline字体
1 | brew install powerlevel9k |
powerline配置
在~/.zshrc中配置ZSH_THEME
1 | ZSH_THEME="powerlevel9k/powerlevel9k" |
oh-my-zsh插件
插件列表
- https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins
- https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins
在~/.zshrc中增加如下配置安装插件
1 | plugins=( |